import logging
#logging.basicConfig(format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s',
#                    level=logging.DEBUG)

lb_logger = logging.getLogger('light_box')
lb_logger.setLevel(logging.DEBUG)
lb_formatter = logging.Formatter('%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s')

lb_file_handler = logging.FileHandler('light_box_test.log', encoding="utf-8", mode="a")
lb_file_handler.setLevel(level=logging.INFO)
lb_file_handler.setFormatter(lb_formatter)

lb_stream_handler = logging.StreamHandler()
lb_stream_handler.setLevel(logging.DEBUG)
lb_stream_handler.setFormatter(lb_formatter)

lb_logger.addHandler(lb_file_handler)
lb_logger.addHandler(lb_stream_handler)